//
// Created by zhupi on 2024/11/3.
//

#include "view_edit_material_dialog_view_ctrl.h"

ViewEditMaterialDialogViewCtrl &ViewEditMaterialDialogViewCtrl::GetIns() {
    static ViewEditMaterialDialogViewCtrl ins;
    return ins;
}

void ViewEditMaterialDialogViewCtrl::Inital(const QString &buttonName, const std::vector<QString> &rowData)
{
    if (dialog_ != nullptr) {
        delete dialog_;
        dialog_ = nullptr;
    }

    dialog_ = new ViewEditMaterialDialog(nullptr);
    dialog_->Initial();
    dialog_->exec();
    dialog_ = nullptr;
}
